package com.example.zkviewer.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ZkNode {
    private String path;
    private String data;
    private boolean isLeaf;
    private List<ZkNode> children;
    private String acl;
    private long ctime;
    private long mtime;

    // 用于前端展示的简化构造方法
    public ZkNode(String path, String data, boolean isLeaf) {
        this.path = path;
        this.data = data;
        this.isLeaf = isLeaf;
    }
}